package com.luo.backend.dto;

import javax.validation.constraints.*;

/**
 * 发起团购请求DTO
 */
public class CreateGroupBuyingRequest {
    
    @NotNull(message = "商品ID不能为空")
    private Long foodId;
    
    @NotBlank(message = "团购标题不能为空")
    @Size(max = 200, message = "团购标题不能超过200字符")
    private String title;
    
    @Size(max = 1000, message = "团购描述不能超过1000字符")
    private String description;
    
    @NotNull(message = "最少参与人数不能为空")
    @Min(value = 2, message = "最少参与人数不能少于2人")
    @Max(value = 50, message = "最少参与人数不能超过50人")
    private Integer minParticipants;
    
    @NotNull(message = "最多参与人数不能为空")
    @Min(value = 2, message = "最多参与人数不能少于2人")
    @Max(value = 100, message = "最多参与人数不能超过100人")
    private Integer maxParticipants;
    
    @NotNull(message = "团购时长（小时）不能为空")
    @Min(value = 1, message = "团购时长不能少于1小时")
    @Max(value = 72, message = "团购时长不能超过72小时")
    private Integer durationHours;
    
    @NotNull(message = "参与数量不能为空")
    @Min(value = 1, message = "参与数量不能少于1")
    @Max(value = 10, message = "参与数量不能超过10")
    private Integer quantity;
    
    @Size(max = 20, message = "辣度选择不能超过20字符")
    private String spiceLevel;
    
    // ⭐ 新增：商品原价（前端传入）
    private java.math.BigDecimal originalPrice;
    
    // ⭐ 新增：拼单价（前端传入，不再由后端计算8折）
    private java.math.BigDecimal groupPrice;
    
    // Getters and Setters
    public Long getFoodId() {
        return foodId;
    }
    
    public void setFoodId(Long foodId) {
        this.foodId = foodId;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public Integer getMinParticipants() {
        return minParticipants;
    }
    
    public void setMinParticipants(Integer minParticipants) {
        this.minParticipants = minParticipants;
    }
    
    public Integer getMaxParticipants() {
        return maxParticipants;
    }
    
    public void setMaxParticipants(Integer maxParticipants) {
        this.maxParticipants = maxParticipants;
    }
    
    public Integer getDurationHours() {
        return durationHours;
    }
    
    public void setDurationHours(Integer durationHours) {
        this.durationHours = durationHours;
    }
    
    public Integer getQuantity() {
        return quantity;
    }
    
    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }
    
    public String getSpiceLevel() {
        return spiceLevel;
    }
    
    public void setSpiceLevel(String spiceLevel) {
        this.spiceLevel = spiceLevel;
    }
    
    public java.math.BigDecimal getOriginalPrice() {
        return originalPrice;
    }
    
    public void setOriginalPrice(java.math.BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }
    
    public java.math.BigDecimal getGroupPrice() {
        return groupPrice;
    }
    
    public void setGroupPrice(java.math.BigDecimal groupPrice) {
        this.groupPrice = groupPrice;
    }
}

